<template>
  <div class="aside">
    <el-col>
      <el-menu default-active="1" class="el-menu-vertical-demo" :unique-opened="true" router>
        <el-menu-item index="book">
          <el-icon>
            <Reading />
          </el-icon>
          <span>图书管理</span>
        </el-menu-item>

        <el-menu-item index="borrow">
          <el-icon>
            <CreditCard />
          </el-icon>
          <span>借阅管理</span>
        </el-menu-item>

        <el-menu-item index="location">
          <el-icon>
            <MapLocation />
          </el-icon>
          <span>位置查询</span>
        </el-menu-item>

        <el-menu-item index="review">
          <el-icon>
            <ChatLineRound />
          </el-icon>
          <span>评论管理</span>
        </el-menu-item>

        <el-menu-item v-if="checkAuth()" index="management">
          <el-icon>
            <User />
          </el-icon>
          <span>用户管理</span>
        </el-menu-item>
      </el-menu>
    </el-col>
  </div>
</template>

<script setup lang='ts'>
import { ref, reactive, onMounted } from 'vue'
import { Reading, CreditCard, MapLocation, User, ChatLineRound } from "@element-plus/icons-vue";
import { checkAuth } from '@/utils/index'

onMounted(() => {

})


</script>

<style scoped lang="scss">
.aside {
  height: 100%;

  .el-menu-vertical-demo {
    height: 100%;
  }
}
</style>